package com.fr.base.core.antlr.collections.impl;

import java.util.Enumeration;
import java.util.NoSuchElementException;

final class LLEnumeration
  implements Enumeration
{
  LLCell cursor;
  LList list;

  public LLEnumeration(LList paramLList)
  {
    this.list = paramLList;
    this.cursor = this.list.head;
  }

  public boolean hasMoreElements()
  {
    return (this.cursor != null);
  }

  public Object nextElement()
  {
    if (!(hasMoreElements()))
      throw new NoSuchElementException();
    LLCell localLLCell = this.cursor;
    this.cursor = this.cursor.next;
    return localLLCell.data;
  }
}